package com.yumeng.framework.auth.security.userdetails;

import com.yumeng.common.auth.BaseAuthInfo;
import com.yumeng.framework.auth.service.auth.SmsAuthService;

/**
 * @author wxd
 * @date 2025/4/11 16:33
 */
public class SmsUserDetailsServiceImpl extends MyAbstractUserDetailsService {

    private final SmsAuthService smsAuthService;

    public SmsUserDetailsServiceImpl(SmsAuthService smsAuthService) {
        super(smsAuthService);
        this.smsAuthService = smsAuthService;
    }

    @Override
    protected BaseAuthInfo retrieveBaseAuthInfo(Object principal) {
        return smsAuthService.findByAuthKey((String) principal);
    }

}
